<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<div id="qrcode"></div>
		<script src="js/qrcode.min.js"></script>
		<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
		<script type="text/javascript">
			// {nonce_str=TRZQDmIh6ieOgteX, code_url=weixin://wxpay/bizpayurl?pr=Nb4mV53, appid=wxab8acb865bb1637e, sign=158616E7401747FD463322F3F2BF3FA1D42DEC685825BE652CA2131C327AA0B8, trade_type=NATIVE, return_msg=OK, result_code=SUCCESS, mch_id=11473623, return_code=SUCCESS, prepay_id=wx13144853618351d0a735a8d91938230800}
			// 调用 api,获取url,把url生成二维码
			// weixin://wxpay/bizpayurl?pr=Nb4mV53

			  $(function () {
				  $.get("/api/getcodeurl",function (data) {
					  var qrcode = new QRCode(document.getElementById("qrcode"), {
						  text: data.code_url,
						  width: 128,
						  height: 128,
						  colorDark : "#000000",
						  colorLight : "#ffffff",
						  correctLevel : QRCode.CorrectLevel.H
					  });
				  },"json");
			  });
		</script>


	</body>
</html>
